package leegproject.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TabBar;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

	/**
	* Entry point classes define <code>onModuleLoad()</code>.
	*/
	public class CopyOfLeegProject implements EntryPoint {
	@Override
	public void onModuleLoad() {
	

	
	
	Image newBanner = new Image("http://project-isd.appspot.com/Banner.jpg");
	
	// Reserve variable voor niet gebruikte tabs
	Label textLabel1= new Label("Leraar Toevoegen");
	Label textLabel2 = new Label("Les Toevoegen");
	Label textLabel3 = new Label("Klas Toevoegen");
	TextBox textBox1 = new TextBox();

	// Horizonpanel van de tabpanel
	HorizontalPanel myHorizontalPanel = new HorizontalPanel();
	myHorizontalPanel.setBorderWidth(1);
	myHorizontalPanel.add(textLabel1);
	myHorizontalPanel.add(textLabel2);
	myHorizontalPanel.add(textBox1);
	
	//mypanel Hoofdpanel en tussenpanels vaktoevoegen
	VerticalPanel myPanel = new VerticalPanel();
	Label myTitelLabel = new Label();
	myPanel.add(myTitelLabel);
	myTitelLabel.setText("Vaktoevoegen: ");
	VerticalPanel hp1 = new VerticalPanel();
	Label myLabel = new Label();
	hp1.add(myLabel);
	myLabel.setText("Cursuscode");
	TextBox myTextBox = new TextBox();
	hp1.add(myTextBox);
	myTextBox.setText("Geef Cursuscode");
	myTextBox.setVisibleLength(25);
	VerticalPanel hp2 = new VerticalPanel();
	Label myLabel1 = new Label();
	hp2.add(myLabel1);
	myLabel1.setText("Cursusnaam");
	TextBox myTextBox1 = new TextBox();
	hp2.add(myTextBox1);
	myTextBox1.setText("Geef Cursusnaam");
	myTextBox1.setVisibleLength(25);
	VerticalPanel hp3 = new VerticalPanel();
	Label myLabel2 = new Label();
	hp3.add(myLabel2);
	myLabel2.setText("Omschrijving");
	TextArea myTextArea = new TextArea();
	hp3.add(myTextArea);
	myTextArea.setText("Geef Omschrijving");
	HorizontalPanel hp4 = new HorizontalPanel();
	Button myButton1 = new Button("Cancel");
	Button myButton = new Button("Vak toevoegen");
	hp4.add(myButton1);
	hp4.add(myButton);
	HorizontalPanel hp5 = new HorizontalPanel();
	Image myHulogo = new Image("http://project-isd.appspot.com/hu.jpg");
	hp5.add(myHulogo);

	
	// Grid opmaak vaktoevoegen
	Grid myGrid = new Grid(6, 3);
	myGrid.setWidget(0, 0, myTitelLabel);
	myGrid.setWidget(0, 2, myHulogo);
	myGrid.setWidget(2, 0, myLabel);
	myGrid.setWidget(2, 1, myTextBox);
	myGrid.setWidget(3, 0, myLabel1);
	myGrid.setWidget(3, 1, myTextBox1);
	myGrid.setWidget(4, 0, myLabel2);
	myGrid.setWidget(4, 1, myTextArea);
	myGrid.setWidget(5, 0, myButton1);
	myGrid.setWidget(5, 1, myButton);
	
	

	
	// Einde tussen en vaktoevoegenpanel
	myPanel.add(hp1);
	myPanel.add(hp2);
	myPanel.add(hp3);
	myPanel.add(hp4);
	myPanel.add(hp5);
	myPanel.add(myGrid);
	
	//mypanel Hoofdpanel leerlingtoevoegen
	VerticalPanel myLeerlingPanel2 = new VerticalPanel();
	Label myTitelLabelb = new Label();
	myTitelLabelb.setText("Leerlingtoevoegen: ");
	myLeerlingPanel2.add(myTitelLabelb);
	VerticalPanel hp1b = new VerticalPanel();
	Label myLabelb = new Label();
	hp1b.add(myLabelb);
	myLabelb.setText("Naam");
	TextBox myTextBoxb = new TextBox();
	myTextBoxb.setText("Geef Naam");
	myTextBoxb.setVisibleLength(25);
	hp1b.add(myTextBoxb);
	VerticalPanel hp2b = new VerticalPanel();
	Label myLabel2b = new Label();
	hp2b.add(myLabel2b);
	myLabel2b.setText("Adres");
	TextBox myTextBox2b = new TextBox();
	myTextBox2b.setText("Geef Straatnaam");
	myTextBox2b.setVisibleLength(25);
	hp2b.add(myTextBox2b);
	VerticalPanel hp3b = new VerticalPanel();
	TextBox myTextBox3b = new TextBox();
	myTextBox3b.setText("Geef Postcode");
	myTextBox3b.setVisibleLength(25);
	hp3b.add(myTextBox3b);
	VerticalPanel hp4b = new VerticalPanel();
	Label myLabel4b = new Label();
	hp4b.add(myLabel4b);
	myLabel4b.setText("Woonplaats");
	TextBox myTextBox4b = new TextBox();
	myTextBox4b.setText("Geef woonplaats");
	myTextBox4b.setVisibleLength(25);
	hp4b.add(myTextBox4b);
	VerticalPanel hp5b = new VerticalPanel();
	Label myLabel5b = new Label();
	hp5b.add(myLabel5b);
	myLabel5b.setText("Geboortedatum");
	TextBox myTextBox5b = new TextBox();
	myTextBox5b.setText("Geef geboortedatum");
	myTextBox5b.setVisibleLength(25);
	hp5b.add(myTextBox5b);
	HorizontalPanel hp6b = new HorizontalPanel();
	Button myButton1b = new Button("Cancel");
	Button myButtonb = new Button("Leerling toevoegen");
	hp6b.add(myButton1b);
	hp6b.add(myButtonb);
	HorizontalPanel hp7b = new HorizontalPanel();
	Image myHulogob = new Image("http://project-isd.appspot.com/hu.jpg");
	hp7b.add(myHulogob);
	
	// Grib opmaak
	Grid myGridb = new Grid(8, 3);
	myGridb.setWidget(0, 0, myTitelLabelb);
	myGridb.setWidget(0, 2, myHulogob);
	myGridb.setWidget(2, 0, myLabelb);
	myGridb.setWidget(2, 1, myTextBoxb);
	myGridb.setWidget(3, 0, myLabel2b);
	myGridb.setWidget(3, 1, myTextBox2b);
	myGridb.setWidget(4, 1, myTextBox3b);
	myGridb.setWidget(5, 0, myLabel4b);
	myGridb.setWidget(5, 1, myTextBox4b);
	myGridb.setWidget(6, 0, myLabel5b);
	myGridb.setWidget(6, 1, myTextBox5b);
	myGridb.setWidget(7, 0, myButton1b);
	myGridb.setWidget(7, 1, myButtonb);
	

	
	// Einde tussenapnnels en hoofdpannels
	myLeerlingPanel2.add(hp1b);
	myLeerlingPanel2.add(hp2b);
	myLeerlingPanel2.add(hp3b);
	myLeerlingPanel2.add(hp4b);
	myLeerlingPanel2.add(hp5b);
	myLeerlingPanel2.add(hp6b);
	myLeerlingPanel2.add(hp7b);
	myLeerlingPanel2.add(myGridb);
	
	
	//Tabpanel
	TabPanel myTabPanel = new TabPanel();
	myTabPanel.setSize("900px", "500px");
	myTabPanel.setAnimationEnabled(true);
	myTabPanel.add(myPanel, "Vak toevoegen");
	myTabPanel.add(myLeerlingPanel2, "Leerling toevoegen");
	myTabPanel.add(textLabel1, "Leraar toevoegen");
	myTabPanel.add(textLabel2, "Les toevoegen");
	myTabPanel.add(textLabel3, "Klas toevoegen");
	myTabPanel.selectTab(0);
	TabBar myTabBar = new TabBar();
	myTabBar = myTabPanel.getTabBar();
	myTabBar.setTabEnabled(2, false);
	myTabBar.setTabEnabled(3, false);
	myTabBar.setTabEnabled(4, false);
	

	//Rootpannel
	RootPanel.get("main").add(newBanner);
	RootPanel.get("main").add(myTabBar);
	RootPanel.get("main").add(myTabPanel);
	

	
	}
	}
	
